package com.prototype.pattern.service;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author chenchen
 * @description
 * @date 2023/11/17 13:44
 */
@Getter
@Setter
@Slf4j
public abstract class Shape implements Cloneable {

    private String id;
    protected String type;

    public abstract void draw();

    public Object clone() {
        Object clone = null;
        try {
            clone = super.clone();
        } catch (CloneNotSupportedException e) {
            log.error("clone error", e);
        }
        return clone;
    }
}
